package o;

import android.content.Context;
import android.graphics.Bitmap;
import androidx.annotation.NonNull;
import com.bumptech.glide.Glide;

public abstract class wl implements si<Bitmap> {
    protected abstract Bitmap ॱ(@NonNull uc ucVar, @NonNull Bitmap bitmap, int i, int i2);

    @NonNull
    public final tx<Bitmap> ˏ(@NonNull Context context, @NonNull tx<Bitmap> txVar, int i, int i2) {
        if (aau.ˊ(i, i2)) {
            uc ˋ = Glide.ˎ(context).ˋ();
            Bitmap bitmap = (Bitmap) txVar.ˋ();
            if (i == Integer.MIN_VALUE) {
                i = bitmap.getWidth();
            }
            if (i2 == Integer.MIN_VALUE) {
                i2 = bitmap.getHeight();
            }
            Bitmap ॱ = ॱ(ˋ, bitmap, i, i2);
            if (bitmap.equals(ॱ)) {
                return txVar;
            }
            return wh.ˊ(ॱ, ˋ);
        }
        throw new IllegalArgumentException("Cannot apply transformation on width: " + i + " or height: " + i2 + " less than or equal to zero and not Target.SIZE_ORIGINAL");
    }
}
